package com.becca.cake.service.system;

import java.util.List;
import java.util.Map;

import com.becca.cake.model.system.RoleDO;

/**
 * 角色管理Service接口层 
 * @author hejinguo
 * @version $Id: IUserRoleService.java, v 0.1 2013-12-2 下午10:59:09
 */
public interface IUserRoleService {
    /**
     * 查询全部的角色
     * @author hejinguo 
     * @return
     * @throws Exception
     */
    List<RoleDO> selectAllRoles() throws Exception;

    /**
     * 角色管理中查询全部角色
     * @author hejinguo 
     * @param map
     * @return
     * @throws Exception
     */
    List<RoleDO> selectAllRoleMessage(Map<String, Object> map) throws Exception;

    /**
     * 角色管理中查询全部角色的总记录数
     * @author hejinguo 
     * @param map
     * @return
     * @throws Exception
     */
    Long selectAllRoleMessageCount(Map<String, Object> map) throws Exception;

    /**
     * 根据ID查询角色信息
     * @author hejinguo
     * @param roleId
     * @return
     * @throws Exception
     */
    String selectRoleById(String roleId) throws Exception;

    /**
     * 添加角色信息
     * @author hejinguo
     * @param roleDO
     * @throws Exception
     */
    void insetOrUpdateRole(RoleDO roleDO) throws Exception;

    /**
     * 根据ID删除角色信息
     * @author hejinguo 
     * @param ids
     * @throws Exception
     */
    void deleteRoleById(String ids) throws Exception;

    /**
     * 根据员工ID查询角色信息
     * @author hejinguo
     * @param adminId
     * @return
     * @throws Exception
     */
    String selectRoleByAdminId(String adminId) throws Exception;

    /**
     * 根据部门ID查询对应的角色信息
     * @author hejinguo
     * @param deptId
     * @return
     * @throws Exception
     */
    String selectRoleByDeptId(Map<String, Object> map) throws Exception;

    /**
     * 分配角色
     * @author hejinguo
     * @param map
     * @throws Exception
     */
    void insertAdminRole(Map<String, Object> map) throws Exception;

}
